#pragma once
#include "wx/wx.h"
#include "SourceWindow.h"
// Define a new frame type: this is going to be our main frame
#include "wx/html/htmlproc.h"
#include "ImageCanvas.h"
#include "Image.h"
class BoldProcessor : public wxHtmlProcessor
{
public:
    virtual wxString Process(const wxString& s) const
    {
        wxString r(s);
        r.Replace(wxT("<b>"), wxEmptyString);
        r.Replace(wxT("<B>"), wxEmptyString);
        r.Replace(wxT("</b>"), wxEmptyString);
        r.Replace(wxT("</B>"), wxEmptyString);

        return r;
    }
};

class SourceFrame: public wxFrame{
public:
	SourceFrame(const wxString& title, const wxPoint& pos,const wxSize& size);
	void OnQuit(wxCommandEvent& event);

private:
	SourceWindow *m_SourceWindow;

	 DECLARE_EVENT_TABLE()
};

class MainFrame : public wxFrame
{
public:
    // ctor(s)
    MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
	~MainFrame()
	{

	}

    // event handlers (these functions should _not_ be virtual)
    void OnClose(wxCloseEvent& event);
    void OnLoadImage(wxCommandEvent& event);
    void OnShowSource(wxCommandEvent& event);
	void OnGAUSS(wxCommandEvent& event);
	NOVA::Image* GetImage(){return m_pImg;}
	//void OnLinearCPP(wxCommandEvent&event);
	//void OnCUDA(wxCommandEvent&event);
	//void OnOPENCL(wxCommandEvent&event);
	//void OnOPENGL(wxCommandEvent&event);
    //void OnBack(wxCommandEvent& event);
    //void OnForward(wxCommandEvent& event);
    //void OnProcessor(wxCommandEvent& event);

private:
    //SourceWindow *m_Html;
    //wxHtmlProcessor *m_Processor;
	ImageCanvas* m_canvas;

	wxBitmap* m_bmp;
	NOVA::Image* m_pImg;
	NOVA::Image* m_img_rev;

    // Any class wishing to process wxWidgets events must use this macro
    DECLARE_EVENT_TABLE()
};